{	Problem: http://codeforces.ru/problemset/problem/32/B
 	Verdict: Accepted
}
var i:longint; s,t,r:string;
begin
readln(s);
t:='';
r:='';
for i:=1 to length(s) do begin
  t:=t+s[i];
  if t='.' then begin
    t:='';
    r:=r+'0';
  end else
  if t='--' then begin
    t:='';
    r:=r+'2';
  end else
  if t='-.' then begin
    t:='';
    r:=r+'1';
  end;
end;
write(r);
end.